import Vue from 'vue'
import Router from 'vue-router'
import create from './views/create.vue'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'create',
      component: create
    },
    {
      path: '/create',
      name: 'create',
      component: create
    },
    {
      path: '/list',
      name: 'list',
      component: () => import('./views/list.vue')
    },
    {
      path: '/temInfo',
      name: 'temInfo',
      component: () => import('./views/temInfo.vue')
    },
    {
      path: '/glTem',
      name: 'glTem',
      props: (route) => {
        return {
          GL: route.query.GL
        }
      },
      component: () => import('./views/glTem.vue')
    },
    {
      path: '/GLlist',
      name: 'GLlist',
      component: () => import('./views/GLlist.vue')
    }
  ]
})
